package cn.uc.ucgc.community.upgrade.conf;

import java.io.File;
import java.util.List;

/**
 * property/xml类型文件，需要做修改的任务
 * 
 * @author yuyj@ucweb.com
 * @createDate 2014-3-7
 *
 */
public class DeleteJob {
    private JobType type;
    /*文件路径-绝对路径*/
    private File path;
    /*需要替换的keys*/
    private List<DeleteItem> deleteItems;

    public DeleteJob(JobType type, File path, List<DeleteItem> deleteItems) {
        this.type = type;
        this.path = path;
        this.deleteItems = deleteItems;
    }

    public JobType getType() {
        return type;
    }

    public File getSrcPath() {
        return path;
    }

    public List<DeleteItem> getDeleteItems() {
        return deleteItems;
    }

    /**
     * 新配置文件中需要删除的项
     * 
     * @author laizy@ucweb.com
     * @createDate 2014-4-1
     *
     */
    public static class DeleteItem {
        /*文件中，需要修改对应值的key*/
        private String name;

        public DeleteItem(String name) {
            super();
            this.name = name;
        }

        public String getName() {
            return name;
        }

    }
}
